<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        //对象合并
        let name = {name: 'zyw'}
        let age = {age: 22}
        let person = {...name,...age}
        name.name = 'lisi'
        Object.assign(person,name,age)
        console.log(person)
    </script>
</head>
<body>

</body>
</html>